package com.ydy.shardingjdbc.service;

import com.ydy.shardingjdbc.dto.ProductInfo;
import com.ydy.shardingjdbc.mapper.ShardingJdbcMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ShardingJdbcService {

    @Resource
    private ShardingJdbcMapper shardingJdbcMapper;


    public void insertProductInfo(Integer id) {
        ProductInfo productInfo = new ProductInfo(id,"张三" + id);
        shardingJdbcMapper.insertProductInfo(productInfo);
    }
}
